﻿using Prism.Mvvm;
using System.Windows;

namespace WpfApp1.Models
{
    /// <summary>
    /// 绘制过程中，临时的连接点
    /// </summary>
    public class PartPort : PortBase
    {
        public PartPort(double X, double Y)
        {
            Position = new Point(X, Y);
        }
    }

    /// <summary>
    /// 控件周围用于连接的连接点
    /// </summary>
    public class FullyPort : PortBase
    {

    }


    public class PortBase : BindableBase
    {
        /// <summary>
        /// 连接点的位置属性
        /// </summary>
        private PortOrientation _orientation;
        public PortOrientation Orientation { get => _orientation; set => SetProperty(ref _orientation, value); }

        /// <summary>
        /// 连接点的实际坐标位置
        /// </summary>
        private Point _position;
        public Point Position { get => _position; set => SetProperty(ref _position, value); }
    }

    public enum PortOrientation
    {
        None = 0,
        Top,
        TopRight,
        Right,
        BottomRight,
        Bottom,
        BottomLeft,
        Left,
        TopLeft
    }
}
